using UnityEngine;
using System.Collections;

// Parent class of all marker points.
public abstract class Point : MonoBehaviour {

	public bool debug = false;
	
	// The colors of the debug figure.
	private Color colCenter,
				  colForward,
				  colUp;
	
	// The scale of the debug figure.
	private static float SCALE = 0.01f;
	
	protected void setColorCenter(Color col) {
		colCenter = col;
	}
	
	protected void setColorForward(Color col) {
		colForward = col;
	}
	
	protected void setColorUp(Color col) {
		colUp = col;
	}
	
	// Draw some debug graphics.
	void OnDrawGizmos() {
		if (debug) {
			// Center sphere
			Gizmos.color = colCenter;
			Gizmos.DrawSphere(transform.position, SCALE);
			
			// Forward ray
			Gizmos.color = colForward;
			Debug.DrawRay(transform.position, transform.forward * 100.0f, colForward);
			Gizmos.DrawSphere(transform.position + (transform.forward * SCALE * 2), SCALE / 2);
			
			// Up sphere
			Gizmos.color = colUp;
			Debug.DrawRay(transform.position, transform.up * 100.0f, colUp);
			Gizmos.DrawSphere(transform.position + (transform.up * SCALE * 2), SCALE / 2);
		}
	}
}
